#pragma once

#include <QtGui>
#include "forms\alphabasewidget.h"

class ScreenShot : public AlphaBaseWidget
{
	Q_OBJECT

public:
	ScreenShot(QWidget *parent = 0);

	void setupUI();
	void start();

	void catchScreen();
	QPoint pos1, pos2;
	bool isOK;

signals:
	void shotWindow(QWidget *w);

protected:
	virtual void keyPressEvent(QKeyEvent *e);
	virtual void paintEvent(QPaintEvent *e);
	virtual void resizeEvent(QResizeEvent *e);
	virtual void mouseDoubleClickEvent(QMouseEvent *e);
	virtual void mousePressEvent(QMouseEvent *e);
	virtual void mouseReleaseEvent(QMouseEvent *e);
	virtual void mouseMoveEvent(QMouseEvent *e);

private:
	QPoint movePos1, movePos2;
	QRect rcSelect;
	bool isDown;
	bool isShot;
	bool isShotMove;	
};